6c84f630e829bba0553768e1d45a56f0386b5ade,src/main/java/gr8pefish/ironbackpacks/util/helpers/IronBackpacksHelper.java,IronBackpacksHelper,equipBackpackFromKeybinding,#EntityPlayer#,171
Before Change
if (hasEmptySlot) {
//take off backpack and put in player's inventory
player.inventory.addItemStackToInventory(backpack);
//update equipped backpack to null
PlayerWearingBackpackCapabilities.setEquippedBackpack(player, null);
After Change
}
if (hasEmptyHotbarSlot) {
if (player.getHeldItemMainhand() == null) {
player.setItemStackToSlot(EntityEquipmentSlot.MAINHAND, backpack);
} else {
//take off backpack and put in player's inventory
player.inventory.addItemStackToInventory(backpack);
}
} else {
if (player.getHeldItemOffhand() == null) hasEmptyOffhand = true;